package com.joint.web.action.com;

import com.fz.us.base.bean.Result;
import com.joint.base.entity.Users;
import com.joint.base.service.UsersService;
import com.joint.core.entity.Announce;
import com.joint.core.service.AnnounceService;
import com.joint.web.action.BaseAdminAction;
import net.sf.json.JSONObject;
import org.apache.struts2.convention.annotation.ParentPackage;

import javax.annotation.Resource;
import java.util.*;

/**
 * Created by gcw on 2015/3/5.
 */
@ParentPackage("com")
public class AjaxConfigAction extends BaseAdminAction {
    @Resource
    private AnnounceService announceService;
    @Resource
    private UsersService usersService;

    private List<Announce> announceList;
    private Set<Users> usersSet;
    private Announce announce;
    private String publishTime;
    private String theme;
    private String content;
    private String userId;
    private String callType;

    public String operateType(){
        Result result = new Result(200,"操作状态");
        List<JSONObject> dataRows=new ArrayList<JSONObject>();
        Map<String, Object> data = new HashMap<String, Object>();
        Map<String,Object> rMap = new HashMap<String, Object>();
        rMap.put("action","comment");
        rMap.put("name","发送");
        dataRows.add(JSONObject.fromObject(rMap));
        data.put("datarows", dataRows);
        result.setData(data);
        return ajaxHtmlAppResult(result);
    }
    public List<Announce> getAnnounceList() {
        return announceList;
    }

    public void setAnnounceList(List<Announce> announceList) {
        this.announceList = announceList;
    }

    public Announce getAnnounce() {
        return announce;
    }

    public void setAnnounce(Announce announce) {
        this.announce = announce;
    }

    public String getPublishTime() {
        return publishTime;
    }

    public void setPublishTime(String publishTime) {
        this.publishTime = publishTime;
    }

    public String getTheme() {
        return theme;
    }

    public void setTheme(String theme) {
        this.theme = theme;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public Set<Users> getUsersSet() {
        return usersSet;
    }

    public void setUsersSet(Set<Users> usersSet) {
        this.usersSet = usersSet;
    }

    public String getCallType() {
        return callType;
    }

    public void setCallType(String callType) {
        this.callType = callType;
    }
}
